060dbff1ee1caa4e7f62227cf92b33009d7509b3,src/main/java/plugin/Stitching_Grid.java,Stitching_Grid,initializeReader,#String#,745

Before Change


	protected IFormatReader initializeReader(final String file)
		throws FormatException, IOException
	{
		final ImageReader in = new ImageReader();
		final IMetadata omeMeta = MetadataTools.createOMEXMLMetadata();
		in.setMetadataStore(omeMeta);
		in.setId(file);
		return in;
	}

After Change


	protected IFormatReader initializeReader(IFormatReader in, final String file)
	{
		IJ.log("Initializing Bio-Formats reader...");
		if (in == null || !file.equalsIgnoreCase(in.getCurrentFile())) {
			if (in != null) {
				try {
					in.close();
				}
				catch (IOException e) {
					IJ.log("Failed to close Bio-Formats reader.");
					return null;
				}
			}
			in = new ImageReader();
			final IMetadata omeMeta = MetadataTools.createOMEXMLMetadata();
			in.setMetadataStore(omeMeta);
			try {
				in.setId(file);
			}
			catch (FormatException e) {
				IJ.log("Failed to discover file names. FormatException when parsing: " +